-- GENERATED SPELL FOR [Nightmare Wyrmkin] --


function spell0_5280(pUnit, Event) --@Acid Spit,n/a--
pUnit:FullCastSpellOnTarget(9591,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5280', 3000, 1)
end

function spell1_5280(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(12098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5280', 21000, 1)
end

function Sorts_5280(pUnit, Event)
local choix_sorts_5280 = math.random(0, 1)
if choix_sorts_5280 == 0 then
pUnit:RegisterEvent('spell0_5280', 1, 1)
end
if choix_sorts_5280 == 1 then
pUnit:RegisterEvent('spell1_5280', 1, 1)
end
end

function mob5280_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5280', math.random(1500, 3000), 1)
end

function mob5280_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5280_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5280_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5280, 1, 'mob5280_Action')
RegisterUnitEvent(5280, 2, 'mob5280_Leave')
RegisterUnitEvent(5280, 3, 'mob5280_Kill')
RegisterUnitEvent(5280, 4, 'mob5280_Die')
